package com.yxx.linkedlist;

import java.util.Stack;

//演示栈Stack的基本使用
public class TestStack {

    public static void main(String[] args) {
        Stack<String> stacks = new Stack();
        stacks.push("jack");
        stacks.push("tom");
        stacks.push("smith");

        while (stacks.size()>0){
            System.out.println(stacks.pop());
        }
    }
}
